package com.zeng.createmd.restfulmodule;


import com.zeng.nicecommon.annotation.EnableCommon;
import com.zeng.nicecore.annotation.EnableCore;
import com.zeng.createmd.restfulmodule.annotation.EnableCreateMdRestful;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.ApplicationPidFileWriter;
import org.springframework.context.annotation.Bean;
import org.springframework.web.socket.config.annotation.EnableWebSocket;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

@EnableCreateMdRestful
@EnableCommon
@EnableCore
@SpringBootApplication
@EnableWebSocket
public class CreateMdRestfulApplication {
    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(CreateMdRestfulApplication.class);
        app.addListeners(new ApplicationPidFileWriter());
        app.run(args);
    }

    @Bean
    public ServerEndpointExporter serverEndpointExporter(){
        return new ServerEndpointExporter();
    }
}
